(function () {
    var citiesLayer = new Kinetic.Layer({
        "name": "cities"
    });
    State.stage.add(citiesLayer);

    // Wire reset button to reset display on all tracks.
    Events.reset.on(function () {
        $.each(State.cities, function (name, city) {
            city.reset();
        });
    });

    $.each(Data.cities, function (index, cityData) {
        var city = new UI.City(State.scorer, cityData, citiesLayer);
        State.cities[city.getName()] = city;
    });
}());
